import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:provider_demo/model/somemodel.dart';
import 'package:provider_demo/base_example_problem.dart';
import 'package:provider_demo/provider_base_example_consumer.dart';
import 'package:provider_demo/provider_base_example_solution.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  final SomeModel someModel = SomeModel(name:"Milano Academy", address:"4291 Roghan Terrace", features:["Natural","40x70m",'Common'], rating:4.5);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      //home: BaseExampleProble(model: someModel,),
      home: Provider<SomeModel>(
        builder: (context)=>someModel,
       // child: ProviderBaseExampleSolution(),
        child: ProviderBaseExampleSolutionWithConsumer(),
      ),
    );
  }
}
